<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Loader extends CI_Loader{
    //前台基本视图文件存放位置
    protected $_front_theme='front/default/';

    //后台基本视图文件存放位置
    protected $_admin_theme='admin/';

    /**
     *开启前台换模板皮肤功能
     */
    public function switch_front_themes_on(){
        $this->_ci_view_paths=array(FCPATH . THEMES_DIR . $this->_front_theme	=> TRUE);
    }

    /**
     *开启后台换模板皮肤功能
     */
    public function switch_admin_themes_on(){
        $this->_ci_view_paths=array(FCPATH . THEMES_DIR . $this->_admin_theme	=> TRUE);
    }
}
